//
//  YJQSportMainViewController.m
//  GoodLuck
//
//  Created by 杨瑞 on 16/12/12.
//  Copyright © 2016年 杨瑞. All rights reserved.
//

#import "YJQSportMainViewController.h"
#import "YJQSportingViewController.h"
#import "YJQSportTypeModel.h"

@interface YJQSportMainViewController ()

@property (nonatomic ,assign) YJQSportType sportType;
    
@end

@implementation YJQSportMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
}
    
//区分运动类型
- (IBAction)sportType:(UIButton *)sender {
    NSInteger type = sender.tag;
//    YJQSportingViewController *sportingVC = [YJQSportingViewController new];
    //从sb加载控制器
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"YJQSporting" bundle:nil];
    YJQSportingViewController *sportingVC = sb.instantiateInitialViewController;
    sportingVC.sportType = type;
    [self presentViewController:sportingVC animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
